'\" te
.\" Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH IFPARSE 8 "May 9, 2001"
.SH NAME
ifparse \- parse \fBifconfig\fR command line
.SH SYNOPSIS
.LP
.nf
\fB/sbin/ifparse\fR [\fB-fs\fR] \fIaddr_family\fR \fIcommands\fR
.fi

.SH DESCRIPTION
.sp
.LP
Use the \fBifparse\fR command to parse the \fBifconfig\fR(8) command line
options and output substrings, one per line, as appropriate. If no options are
specified, \fBifparse\fR returns the entire \fBifconfig\fR command line as a
series of substrings, one per line.
.SH OPTIONS
.sp
.LP
The \fBifparse\fR command supports the following options:
.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.RS 6n
Lists only substrings of the \fBifconfig\fR command line that are relevant to
IP network multipath failover
.RE

.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.RS 6n
 Lists only substrings of the \fBifconfig\fR command line that are not relevant
to IP network multipath failover
.RE

.SH OPERANDS
.sp
.LP
The \fBifparse\fR command \fBdoes not\fR support the \fIinterface\fR operand of
the \fBifconfig\fR command.
.SH EXAMPLES
.LP
\fBExample 1 \fRParsing Command Line Options Relevant to Failover
.sp
.LP
The following example shows the use of the \fBifparse\fR command to parse the
command line options relevant to IP network multipath failover:

.sp
.in +2
.nf
example# \fBifparse -f inet 1.2.3.4 up group one addif 1.2.3.5 -failover up\fR
set 1.2.3.4 up
.fi
.in -2
.sp

.LP
\fBExample 2 \fRParsing Command Line Options That Are Not Relevant to Failover
.sp
.LP
The following example shows the use of the \fBifparse\fR command to parse the
command line options that are not relevant to IP network multipath failover:

.sp
.in +2
.nf
example# \fBifparse -s inet 1.2.3.4 up group one addif 1.2.3.5 -failover up\fR
group one
addif 1.2.3.5 -failover up
.fi
.in -2
.sp

.LP
\fBExample 3 \fRParsing the Command Line For All Options
.sp
.LP
The following example shows the use of the \fBifparse\fR command to parse the
command line for all \fBifconfig\fR options:

.sp
.in +2
.nf
example# \fBifparse inet 1.2.3.4 up group one addif 1.2.3.5 -failover up\fR
group one
set 1.2.3.4 up
addif 1.2.3.5 -failover up
.fi
.in -2
.sp

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Stability Level	Obsolete
.TE

.SH SEE ALSO
.sp
.LP
.BR attributes (7),
.BR ifconfig (8)
.SH DIAGNOSTICS
.sp
.LP
usage: \fB-fs\fR <addr_family> <commands>
.RS +4
\fBDescription: \fR
.sp
.LP
This message indicates an invalid command line.
.RE

.sp
.LP
\fBifparse\fR: Not enough space
.RS +4
\fBDescription: \fR
.sp
.LP
This message indicates insufficient memory.
.RE

.sp
.LP
\fBifparse\fR: dhcp not supported for inet6
.RS +4
\fBDescription: \fR
.sp
.LP
DHCP operations are not supported for the \fBinet6\fR address family.
.RE

.sp
.LP
\fBifparse\fR: Operation <operation> not supported for <addr_family>
.RS +4
\fBDescription: \fR
.sp
.LP
Most operations cannot be used with all address families. For example, the
\fBbroadcast\fR operation is not supported on the \fBinet6\fR address family.
.RE

.sp
.LP
\fBifparse\fR: no argument for <operation>
.RS +4
\fBDescription: \fR
.sp
.LP
Some operations, for example \fBbroadcast\fR, require an argument.
.RE

.SH NOTES
.sp
.LP
The \fBifparse\fR command is classified as an obsolete interface. It will
likely be removed in a future release. You should not develop applications that
depend upon this interface.
